<template>
	<div>
		<transition name="fade" mode="out-in">
			<div class="dialog-box" v-if="show">
				<div @click="close" class="mask"></div>
				<div class="content">
					<van-icon @click="close" class="close" size="20px" color="#D9D9D9" name="cross" />
					<div class="c">
						<svg-icon class="icon" iconName="copy-ok"></svg-icon>
						<div class="d">
							淘口令复制成功
						</div>
						<div class="d1">
							打开【淘宝】购买吧
						</div>
					</div>
				</div>
			</div>
		</transition>
	</div>
</template>
<script>
export default {
	data() {
		return {
			show: false,
			title: ''
		};
	},
	mounted() {
		setTimeout(() => {
			this.show = true;
		}, 100);

		setTimeout(() => {
			this.show = false;
		}, 2000);
	},
	methods: {
		open() {
			this.show = true;
		},
		close() {
			this.show = false;
			setTimeout(() => {
				this.$destroy();
			}, 300);
		}
	}
};
</script>
<style lang="scss" scoped>
.fade-enter-active,
.fade-leave-active {
	transition: opacity 0.5s;
}
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
	opacity: 0;
}

.dialog-box {
	transition: all 0.3s;
}
.mask {
	background: rgba(0, 0, 0, 0.3);
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
}
.content {
	width: 452px;
	height: 336px;
	background: $bg-white;
	border-radius: 16px;
	margin: 65% auto 0 auto;
	position: fixed;
	top: 0;
	left: 50%;
	margin-left: -226px;
	z-index: 2;
	padding: 36px;
	.c {
		display: flex;
		justify-content: center;
		padding-top: 34px;
		flex-direction: column;
		font-size: 28px;
		align-items: center;
		.icon {
			font-size: 104px;
		}
		.d {
			margin-top: 28px;
		}
		.d1 {
			margin-top: 5px;
		}
	}
	.close {
		position: absolute;
		right: 10px;
		top: 10px;
	}
	.title {
		/* prettier-ignore */
		font-size:16PX;
		margin-top: 66px;
		text-align: center;
		color: #383434;
		position: relative;
	}
}
</style>
